{% extends 'layout.html' %} 
{% block main %}
<div class="table_content">
    <div class="table_content_head pd_b20 pd_t20 clear">
        <a href="/admin/tag/add" class="small_btn orange_color fr">添加</a>
    </div>
    <table class="table table-hover table-bordered">
        <thead>
            <tr>
                <th>id</th>
                <th>标签名</th>
                <th>显示顺序</th>
                <th>是否显示</th>
                <th width="90">操作</th>
            </tr>
        </thead>
        <tbody>
        {% if tags.length > 0 %}
            {% for tag in tags %}
                <tr>
                    <td>{{tag.id}}</td>
                    <td>{{tag.tag}}</td>
                    <td>{{tag.orderTag}}</td>
                    <td>{{tag.showTag}}</td>
                    <td><a href="/admin/tag/edit?id={{tag.id}}">编辑</a> | <a onclick="confirmAlert('确定要删除吗','/admin/tag/del?id={{tag.id}}');" href="javascript:;">删除</a></td>
                </tr>
            {% endfor %}
        {% else %}
            <tr align="center"><td colspan="5" >您的标签列表里空空如也，快去添加吧</td></tr>
        {% endif %}
        </tbody>
    </table>
    {% include 'page.html' %}
</div>
{% endblock %}
